﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace GN.Data.SqlClient
{
    public class DataParameter : System.Data.Common.DbParameter, IDataParameter, ICloneable
    {
        public override DbType DbType { get; set; }
        public override ParameterDirection Direction { get; set; }
        public override bool IsNullable { get; set; }
        public override string ParameterName { get; set; }
        public override int Size { get; set; }
        public override string SourceColumn { get; set; }
        public override bool SourceColumnNullMapping { get; set; }
        public override object Value { get; set; }
        public object SqlValue { get; set; }

        public object Clone()
        {
            throw new NotImplementedException();
        }

        public override void ResetDbType()
        {

        }

        public DataParameter()
        {

        }

        public DataParameter(string parameterName, DbType dbType, int size)
        {
            this.Size = size;
            this.ParameterName = parameterName;
            this.DbType = dbType;
        }

        public DataParameter(string parameterName, DbType dbType)
        {
            this.ParameterName = parameterName;
            this.DbType = dbType;
        }
        public DataParameter(string parameterName, object sqlValue)
        {
            this.ParameterName = parameterName;
            this.SqlValue = Value = sqlValue;
        }
    }
}
